<<<<<<< HEAD
import React from 'react';
import logo from './logo.svg';
import './App.css';

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <img src={logo} className="App-logo" alt="logo" />
        <p>
          Edit <code>src/App.tsx</code> and save to reload.
        </p>
        <a
          className="App-link"
          href="https://reactjs.org"
          target="_blank"
          rel="noopener noreferrer"
        >
          Learn React
        </a>
      </header>
    </div>
  );
}

export default App;
=======
import React from 'react'
import { BrowserRouter, Routes, Route } from 'react-router-dom'
import './App.css'
import 'antd/dist/reset.css'
import { routes } from './router/routes'
const App = () => {
  return (
    <BrowserRouter>
      <Routes>
        {routes.map((v, i) => {
          return (
            <Route path={v.path} element={v.element} key={i}>
              {v.children &&
                v.children
                  .reduce((p, n) => {
                    return n.children ? p.concat(n.children) : p.concat(n)
                  }, [])
                  .map((v, i) => {
                    return (
                      <Route path={v.path} element={v.element} key={i}></Route>
                    )
                  })}
            </Route>
          )
        })}
      </Routes>
    </BrowserRouter>
  )
}
export default App
>>>>>>> 00dd3a7 (王宇杰2.22日作业)
